package com.xxx.service;

import com.xxx.dao.StudentDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.sql.Connection;

/**
 * @version v1.0
 * @Description:
 * @Author zhanzhongxin
 * @Date 2021/8/17 9:54
 * @Copyright 博为峰
 */
@Service("studentService")
public class StudentServiceImpl implements StudentService {

    @Autowired
    public StudentDao studentDao;

    @Value("${jdbc.url}")
    public String url;

    @Autowired
    public Connection connection;

    @Override
    public int addStu() {
        System.out.println(url);
        System.out.println("StudentServiceImpl-->addStu");
        System.out.println(connection);
        return studentDao.insertStu();
    }
}
